import React from 'react'
import SeniorBar from './SeniorBar'
// import ContentBar from './ContentBar'
import Article from './Article'
import { withRouter } from 'react-router-dom'
class Content extends React.Component{
    constructor(props){
        super(props)
        this.state={
            Tab:this.props.Tab,
            Tag:this.props.Tag?this.props.Tag:null,
            CategoriesId: this.props.CategoriesId?this.props.CategoriesId:0
        }
    }

    // shouldComponentUpdate(){
    //     console.log(this.props.history)
    //     document.documentElement.scrollTop = this.props.history.page
        
    //     return true
    // }
    
    
    render(){
        return(
            <div>
                <SeniorBar Tab={this.state.Tab} Tag={this.state.Tag}/>
                {/* <ContentBar/> */}
                <Article CategoriesId={this.state.CategoriesId}/>
            </div>
        )
    }
}
export default withRouter(Content)